    package com.github.jettyrun.springinterface.demo.factorybean;

    import com.github.jettyrun.springinterface.demo.bean.Car;
    import org.springframework.beans.factory.FactoryBean;
    import org.springframework.context.annotation.ComponentScan;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.stereotype.Component;

    /**
     * Created by jetty on 18/1/31.
     */

    @Component("protoTypeCarFactoryBean")
    public class ProtoTypeCarFactoryBean implements FactoryBean<Car>{

        public Car getObject() throws Exception {
            return new Car();
        }

        public Class<?> getObjectType() {
            return Car.class;
        }

        public boolean isSingleton() {
            return true;
        }
    }
